package com.proposition.commons.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.ibatis.type.Alias;

import java.io.Serializable;

/**
 * 角色权限表
 * @author yangkai
 *
 */
@Alias("rolePermission")
@TableName("p_role_permission")
public class RolePermission extends Model<RolePermission> {

	@Override
	protected Serializable pkVal() {
		return this.id;
	}
	private Integer id; //主键
	@TableField("r_role_id")
	private Integer roleId; //角色Id
	@TableField("r_permission_id")
	private Integer permissionId; //权限Id

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getRoleId() {
		return roleId;
	}

	public void setRoleId(Integer roleId) {
		this.roleId = roleId;
	}

	public Integer getPermissionId() {
		return permissionId;
	}

	public void setPermissionId(Integer permissionId) {
		this.permissionId = permissionId;
	}

	@Override
	public String toString() {
		return "RolePermission{" +
				"id=" + id +
				", roleId=" + roleId +
				", permissionId=" + permissionId +
				'}';
	}
}
